package it.antonio.ilpizze.te;

public class CharArrayReader implements Reader{
	private char[] chars;
	public int index = -1;
	
	public CharArrayReader(char[] chars) {
		super();
		this.chars = chars;
	}

	@Override
	public boolean hasNext(){
		return index < chars.length - 1;
	}
	
	@Override
	public void next(){
		index++;
	}
	
	@Override
	public char current(){
		return chars[index];
	}

	@Override
	public int position() {
		return index;
	}

	@Override
	public void close() {
		
	}
}
